<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width,  initial-scale=1.0">
    <title>js使用</title>
    <script src=”test.js”></script>
</head>

<body>
    <div id="t"><input type="hidden" id="sss" value="aaa"></div>
</body>

</html>
<script>
    // js文件夹内：
    // Window.onload = function () {
    //     var d = document.getElementById("sss").getAttribute("value");
    //     document.write(d);//在页面打印通过div获取到的value值
    // }
</script>